package i_oStream.objectStream;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class ObjectStream {
    public static void main(String[] args) throws IOException {
        Student stud = new Student("张三", 23);
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("D:\\not\\peizhi.txt"));
        oos.writeObject(stud);
        oos.close();
    }
}
